
import 'package:demo/page/theme.dart';
import 'package:flutter/material.dart';
import 'package:demo/page/calculator.dart';
import 'package:demo/page/setting.dart';
import 'package:demo/page/theme.dart';
import 'package:demo/page/SplashScreen.dart';
import 'package:demo/page/test.dart';
import 'package:demo/page/about.dart';
import 'package:demo/page/keySound.dart';
void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),

    initialRoute:'/splashScreen',
      //注册路由表
      routes: {
        "/calculator":(context) => CalculatorA(),
        "/setting":(context) => SettingPage(title: '設置'),
        "/theme":(context) => themePage(),
        "/splashScreen":(context) => SplashScreen(),
        "/test":(context) => testPage(),
        "/about":(context) => aboutPage(),
        "/keySound":(context) => keySoundPage(),
      },
      home: CalculatorA(),
    );
  }
}
